home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
ARASAN_S.ZIP
/
UTIL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-02-19
|
591b
|
38 lines
// Copyright 1994 by Jon Dart. All Rights Reserved.
#ifndef _UTIL_H
#define _UTIL_H
class Util
{
// commonly used utility functions
public:
static int Abs( const int x )
{
return (x < 0) ? -x : x;
}
static int Sign( const int x )
{
if (x==0)
return 0;
else
return (x > 0) ? 1 : -1;
}
static int Max( const int x, const int y )
{
return (x > y) ? x : y;
}
static int Min( const int x, const int y )
{
return (x > y) ? y : x;
}
};
#endif